const { contextBridge, ipcRenderer } = require('electron')

contextBridge.exposeInMainWorld('electronAPI', {
  getTask: () => ipcRenderer.invoke('dialog:getTask'),
  sendTaskMessage: (input, flag) => ipcRenderer.invoke('dialog:sendTaskMessage', input, flag),
  getTimelineTask: () => ipcRenderer.invoke('dialog:getTimelineTask'),
  setUserData: (key, value) => ipcRenderer.invoke('dialog:setUserData', key, value),
  getUserData: (key) => ipcRenderer.invoke('dialog:getUserData', key),
  openHref: (href) => ipcRenderer.invoke('dialog:openHref', href),
})